package com.zxp.order.controller;

import com.zxp.model.User;
import com.zxp.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zxp
 * @date 2021-08-24 16:52
 */
@RestController
@Slf4j
public class OrderController {

    @DubboReference
    private UserService userService;

    @GetMapping("/user")
    public User getUser(Integer id){
        User user = userService.findUserById(id);
        log.debug("user:"+user);
        return user;
    }

}
